home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
BBS_UTL
/
BFPAGEPC
/
BFPAGE.PAS
next >
Wrap
Pascal/Delphi Source File
|
1994-12-15
|
19KB
|
407 lines
Program BFPAGE_PLUS_PLUS;
{ The Blue Force Sysop Page Utility
(C) 1994 Brian Leiter
01/01/95 Version 2.1ß }
Uses Crt,DOS,Strings;
TYPE
NodeSysRec = Record {Read in the SFNODE.DAT}
DirectScrn,
ShowResult : Boolean;
RAMDrive : Char;
PrinterOn,
AnsiAvl,
Private,
SecondPassword,
Page_On : Boolean;
MinimumBaud : Word;
MsgInfo,
NewFileInfo,
SoftControl,
AvailableBoo : Boolean;
CorrectionMsg : String[3];
WorkPath,
DisplayPath,
ExtranPath,
MsgPath : String[28];
ModIntStr : String[56];
ComPort : Word;
RingNo,
Node : Byte;
MaxBaud,
ExtraLong :LongInt;
TimeComp :Real;
LastDate :String[8];
PrivateSec :Integer;
HangUpDelay :Byte;
UseHiSpeed,
AvailBoolean :Boolean;
IRQ1,
IRQ2,
IRQ3,
IRQ4,
IRQ5,
IRQ6,
IRQ7,
IRQ8 :Byte;
BreakLen :Word;
FAXConnectMsg :String[7];
PreInitStr :String[6];
SubChgSec :Word;
StartWarn :Byte;
ExtraBytes :Array[0..3] Of Byte;
ColorMonitor :Boolean;
OffHookStr :String[6];
ComBase :Array[1..8] Of Word;
AnswerStr :String[30];
NewExtra :Array[0..201] Of Byte;
End;
TYPE
RegistrationKey = Record { Record File Information }
C1,C2,C3 : Char;
SysopName : String[25];
BBSName : String[30];
RegNumber : String[6];
RegMode : Boolean;
Seed1 : String[83];
End;
VAR
UF : File Of NodeSysRec;
Page : NodeSysRec;
Info : File Of RegistrationKey;
Reg : RegistrationKey;
RegStatus : Boolean;
R1,R2,R3 : Integer;
I : Integer;
Procedure RegistrationInfo; { The Procedure Section }
Begin
RegStatus := False;
Assign (Info,'BFPAGE.KEY');
FileMode := 0;
{$I-} Reset(Info) {$I+};
If IOResult<>0 Then
Begin
Writeln('■ Keyfile Not Found!');
Writeln('■ Halting Program!');
Sound(900);Delay(350);NoSound;
Halt(2);
End;
Read(info,reg);
R1 := 215; { Program Code }
R2 := 149; { Validation Code }
R3 := 43; { Crypton Code }
If (R1 = Ord(Reg.C1)) and (R2 = Ord(Reg.C2))
and (R3 = Ord(Reg.C3))
and (Reg.RegMode = True) then RegStatus := True;
End;
Procedure MakeMyLogo;
Begin;
TextColor(15);
TextBackGround(4);
Writeln('╔══════════════════════════════════════╗');
Writeln('║ -■ BFPAGE++ A Sysop Multi-Utility ■- ║');
Writeln('║ ║');
If RegStatus = True Then Writeln('║ Compiled: 01-01-95 * REGISTERED * ║');
If RegStatus = False Then Writeln('║ Compiled: 01-01-95 NOT REGISTERED ║');
Writeln('║ ║');
Writeln('║ (C) 1994 Brian Leiter v2.1ß ║');
Writeln('╚══════════════════════════════════════╝');
TextBackGround(0);
TextColor(14);
End;
Procedure PageOnBulletin; {Create PAGE ON ASCII Bulletin}
Var F : Text;
Begin
Assign(F, (Page.DisplayPath)+(ParamStr(ParamCount))+'.BBS');
If (ParamStr(ParamCount) = '/P+') or (ParamStr(ParamCount) = '/p+') or
(ParamStr(ParamCount) = '/P-') or (ParamStr(ParamCount) = '/p-') or
(ParamStr(ParamCount) = '/PR+') or (ParamStr(ParamCount) = '/pr+') or
(ParamStr(ParamCount) = '/PR-') or (ParamStr(ParamCount) = '/pr-') or
(ParamStr(ParamCount) = '/SP+') or (ParamStr(ParamCount) = '/sp+') or
(ParamStr(ParamCount) = '/SP-') or (ParamStr(ParamCount) = '/sp-') or
(ParamStr(ParamCount) = '/PP+') or (ParamStr(ParamCount) = '/pp+') or
(ParamStr(ParamCount) = '/PP-') or (ParamStr(ParamCount) = '/pp-')
then Assign(F,(Page.DisplayPath)+'ALL.BBS');
Rewrite(F);
Writeln(f,' ');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,' ┌─[ BFPAGE v2.1ß ]───────────────────────────────┐');
Writeln(f,' │┌──────────────────────────────────────────────┐│');
Writeln(f,' ││ ││');
Writeln(f,' ││ ┌──────────────────────────────────────┐ ││');
Writeln(f,' ││ │ The Sysop Page Feature Is Turned On! │ ││');
Writeln(f,' ││ └──────────────────────────────────────┘ ││');
Writeln(f,' ││ ││');
Writeln(f,' │└──────────────────────────────────────────────┘│');
If RegStatus = True Then Writeln(f,' └─────────────────────────────[ * REGISTERED * ]─┘');
If RegStatus = False Then Writeln(f,' └─────────────────────────────[ NOT REGISTERED ]─┘');
Writeln(f,' ');
Close(F); { Close file, save changes }
{Make PAGE ON ANSI Bulletin}
Assign(F, (Page.DisplayPath)+(ParamStr(ParamCount))+'.CLR');
If (ParamStr(ParamCount) = '/P+') or (ParamStr(ParamCount) = '/p+') or
(ParamStr(ParamCount) = '/P-') or (ParamStr(ParamCount) = '/p-') or
(ParamStr(ParamCount) = '/PR+') or (ParamStr(ParamCount) = '/pr+') or
(ParamStr(ParamCount) = '/PR-') or (ParamStr(ParamCount) = '/pr-') or
(ParamStr(ParamCount) = '/SP+') or (ParamStr(ParamCount) = '/sp+') or
(ParamStr(ParamCount) = '/SP-') or (ParamStr(ParamCount) = '/sp-') or
(ParamStr(ParamCount) = '/PP+') or (ParamStr(ParamCount) = '/pp+') or
(ParamStr(ParamCount) = '/PP-') or (ParamStr(ParamCount) = '/pp-')
then Assign(F,(Page.DisplayPath)+'ALL.CLR');
Rewrite(F);
Writeln(f,'
');
Writeln(f,'C
D D D');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'C
┌─[
BFPAGE v2.1ß
]───────────────────────────────
┐
');
Writeln(f,'C
│
┌──────────────────────────────────────────────
┐
│
');
Writeln(f,'C
│
│
┌──────────────────────────────────────────
┐
│
│
');
Writeln(f,'C
│
│
│
┌──────────────────────────────────────
┐
│
│
│
');
Writeln(f,'C
│
│
│
│
The Sysop Page Feature Is Turned On!
│
│
│
│');
Writeln(f,'C
│
│
│
└
──────────────────────────────────────┘
│
│
│
');
Writeln(f,'C
│
│
└
──────────────────────────────────────────┘
│
│
');
Writeln(f,'C
│
└
──────────────────────────────────────────────┘
│
');
If RegStatus = True Then
Writeln(f,'C
└
─────────────────────────────[
* REGISTERED *
]─┘
');
If RegStatus = False Then
Writeln(f,'C
└
─────────────────────────────[
NOT REGISTERED
]─┘
');
Writeln(f,'C
D
');
Close(F); { Close file, save changes }
end;
Procedure PageOffBulletin; {Create PAGE OFF ASCII Bulletin}
Var F : Text;
begin
Assign(F, (Page.DisplayPath)+(ParamStr(ParamCount))+'.BBS');
If (ParamStr(ParamCount) = '/P+') or (ParamStr(ParamCount) = '/p+') or
(ParamStr(ParamCount) = '/P-') or (ParamStr(ParamCount) = '/p-') or
(ParamStr(ParamCount) = '/PR+') or (ParamStr(ParamCount) = '/pr+') or
(ParamStr(ParamCount) = '/PR-') or (ParamStr(ParamCount) = '/pr-') or
(ParamStr(ParamCount) = '/SP+') or (ParamStr(ParamCount) = '/sp+') or
(ParamStr(ParamCount) = '/SP-') or (ParamStr(ParamCount) = '/sp-') or
(ParamStr(ParamCount) = '/PP+') or (ParamStr(ParamCount) = '/pp+') or
(ParamStr(ParamCount) = '/PP-') or (ParamStr(ParamCount) = '/pp-')
then Assign(F,(Page.DisplayPath)+'ALL.BBS');
Rewrite(F);
Writeln(f,' ');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,'');
Writeln(f,' ┌─[ BFPAGE v2.1ß ]───────────────────────────────┐');
Writeln(f,' │┌──────────────────────────────────────────────┐│');
Writeln(f,' ││ ││');
Writeln(f,' ││ ┌──────────────────────────────────────┐ ││');
Writeln(f,' ││ │ The Sysop Page Feature Is Turned Off │ ││');
Writeln(f,' ││ └──────────────────────────────────────┘ ││');
Writeln(f,' ││ ││');
Writeln(f,' │└──────────────────────────────────────────────┘│');
If RegStatus = True Then Writeln(f,' └─────────────────────────────[ * REGISTERED * ]─┘');
If RegStatus = False Then Writeln(f,' └─────────────────────────────[ NOT REGISTERED ]─┘');
Writeln(f,' ');
Close(F); { Close file, save changes }
{Make PAGE OFF ANSI Bulletin}
Assign(F, (Page.DisplayPath)+(ParamStr(ParamCount))+'.CLR');
If (ParamStr(ParamCount) = '/P+') or (ParamStr(ParamCount) = '/p+') or
(ParamStr(ParamCount) = '/P-') or (ParamStr(ParamCount) = '/p-') or
(ParamStr(ParamCount) = '/PR+') or (ParamStr(ParamCount) = '/pr+') or
(ParamStr(ParamCount) = '/PR-') or (ParamStr(ParamCount) = '/pr-') or
(ParamStr(ParamCount) = '/SP+') or (ParamStr(ParamCount) = '/sp+') or
(ParamStr(ParamCount) = '/SP-') or (ParamStr(ParamCount) = '/sp-') or
(ParamStr(ParamCount) = '/PP+') or (ParamStr(ParamCount) = '/pp+') or
(ParamStr(ParamCount) = '/PP-') or (ParamStr(ParamCount) = '/pp-')
then Assign(F,(Page.DisplayPath)+'ALL.CLR');
Rewrite(F);
Writeln(f,'
');
Writeln(f,'C
D D D');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'
');
Writeln(f,'C
┌─[
BFPAGE v2.1ß
]───────────────────────────────
┐
');
Writeln(f,'C
│
┌──────────────────────────────────────────────
┐
│
');
Writeln(f,'C
│
│
┌──────────────────────────────────────────
┐
│
│
');
Writeln(f,'C
│
│
│
┌──────────────────────────────────────
┐
│
│
│
');
Writeln(f,'C
│
│
│
│
The Sysop Page Feature Is Turned Off
│
│
│
│');
Writeln(f,'C
│
│
│
└
──────────────────────────────────────┘
│
│
│
');
Writeln(f,'C
│
│
└
──────────────────────────────────────────┘
│
│
');
Writeln(f,'C
│
└
──────────────────────────────────────────────┘
│
');
If RegStatus = True Then
Writeln(f,'C
└
─────────────────────────────[
* REGISTERED *
]─┘
');
If RegStatus = False Then
Writeln(f,'C
└
─────────────────────────────[
NOT REGISTERED
]─┘
');
Writeln(f,'C
D
');
Close(F); { Close file, save changes }
end;
Procedure ChangeStatus;
begin
If (ParamStr(1) = '/P+') or (ParamStr(1) = '/p+') then Page.Page_On := True;
If (ParamStr(1) = '/P-') or (ParamStr(1) = '/p-') then Page.Page_On := False;
If (ParamStr(1) = '/PR+') or (ParamStr(1) = '/pr+') then Page.PrinterOn := True;
If (ParamStr(1) = '/PR-') or (ParamStr(1) = '/pr-') then Page.PrinterOn := False;
If (ParamStr(1) = '/PP+') or (ParamStr(1) = '/pp+') then Page.Private := True;
If (ParamStr(1) = '/PP-') or (ParamStr(1) = '/pp-') then Page.Private := False;
If (ParamStr(1) = '/SP+') or (ParamStr(1) = '/sp+') then Page.SecondPassword := True;
If (ParamStr(1) = '/SP-') or (ParamStr(1) = '/sp-') then Page.SecondPassword := False;
If (ParamStr(2) = '/P+') or (ParamStr(2) = '/p+') then Page.Page_On := True;
If (ParamStr(2) = '/P-') or (ParamStr(2) = '/p-') then Page.Page_On := False;
If (ParamStr(2) = '/PR+') or (ParamStr(2) = '/pr+') then Page.PrinterOn := True;
If (ParamStr(2) = '/PR-') or (ParamStr(2) = '/pr-') then Page.PrinterOn := False;
If (ParamStr(2) = '/PP+') or (ParamStr(2) = '/pp+') then Page.Private := True;
If (ParamStr(2) = '/PP-') or (ParamStr(2) = '/pp-') then Page.Private := False;
If (ParamStr(2) = '/SP+') or (ParamStr(2) = '/sp+') then Page.SecondPassword := True;
If (ParamStr(2) = '/SP-') or (ParamStr(2) = '/sp-') then Page.SecondPassword := False;
If (ParamStr(3) = '/P+') or (ParamStr(3) = '/p+') then Page.Page_On := True;
If (ParamStr(3) = '/P-') or (ParamStr(3) = '/p-') then Page.Page_On := False;
If (ParamStr(3) = '/PR+') or (ParamStr(3) = '/pr+') then Page.PrinterOn := True;
If (ParamStr(3) = '/PR-') or (ParamStr(3) = '/pr-') then Page.PrinterOn := False;
If (ParamStr(3) = '/PP+') or (ParamStr(3) = '/pp+') then Page.Private := True;
If (ParamStr(3) = '/PP-') or (ParamStr(3) = '/pp-') then Page.Private := False;
If (ParamStr(3) = '/SP+') or (ParamStr(3) = '/sp+') then Page.SecondPassword := True;
If (ParamStr(3) = '/SP-') or (ParamStr(3) = '/sp-') then Page.SecondPassword := False;
If (ParamStr(4) = '/P+') or (ParamStr(4) = '/p+') then Page.Page_On := True;
If (ParamStr(4) = '/P-') or (ParamStr(4) = '/p-') then Page.Page_On := False;
If (ParamStr(4) = '/PR+') or (ParamStr(4) = '/pr+') then Page.PrinterOn := True;
If (ParamStr(4) = '/PR-') or (ParamStr(4) = '/pr-') then Page.PrinterOn := False;
If (ParamStr(4) = '/PP+') or (ParamStr(4) = '/pp+') then Page.Private := True;
If (ParamStr(4) = '/PP-') or (ParamStr(4) = '/pp-') then Page.Private := False;
If (ParamStr(4) = '/SP+') or (ParamStr(4) = '/sp+') then Page.SecondPassword := True;
If (ParamStr(4) = '/SP-') or (ParamStr(4) = '/sp-') then Page.SecondPassword := False;
Reset(UF);
Write(UF,Page);
GOTOXY(2,9);
Write('■ BFPAGE++ BBS System Status Report ■');
Textcolor(10);
Gotoxy(2,11);
if Page.Page_On = True then
begin
Write ('■ Sysop Paging Is Turned.......... ');
Textcolor(15);Write('On!');
end;
if Page.Page_On = False then Write ('■ Sysop Paging Is Turned.......... Off');
Gotoxy(2,12);
Textcolor(12);
if Page.SecondPassword = True then
begin
Write ('■ Second Password Is Turned....... ');
Textcolor(15);Write('On!');
end;
if Page.SecondPassword = False then Write ('■ Second Password Is Turned....... Off');
Gotoxy(2,13);
Textcolor(11);
if Page.Private = True then
begin
Write ('■ Private BBS Is Turned........... ');
Textcolor(15);Write('On!');
end;
if Page.Private = False then Write ('■ Private BBS Is Turned........... Off');
Gotoxy(2,14);
Textcolor(13);
if Page.PrinterOn = True then
begin
Write ('■ Print Log File Is Turned........ ');
Textcolor(15);Write('On!');
end;
if Page.PrinterOn = False then Write ('■ Print Log File Is Turned........ Off');
if (ParamStr(1) = '/P+') or (ParamStr(1) = '/p+') or (ParamStr(2) = '/P+') or (ParamStr(2) = '/p+')
or (ParamStr(3) = '/P+') or (ParamStr(3) = '/p+') or (ParamStr(4) = '/P+') or (ParamStr(4) = '/p+')
then PageOnBulletin;
if (ParamStr(1) = '/P-') or (ParamStr(1) = '/p-') or (ParamStr(2) = '/P-') or (ParamStr(2) = '/p-')
or (ParamStr(3) = '/P-') or (ParamStr(3) = '/p-') or (ParamStr(4) = '/P-') or (ParamStr(4) = '/p-')
then PageOffBulletin;
Gotoxy(1,15);
end;
Procedure ParamError;
begin
clrscr;
Sound(900);
Writeln('Command Line Paramater Error...');
Writeln(' ');
Writeln('Usage = BFPAGE.EXE [Switch] [Switch] [Switch] [Switch] (Bulletin Name)');
Writeln(' ');
Writeln('Enter: BFPAGE.EXE /H for help');
Delay(250);
NoSound;
Halt(1);
end;
Procedure HelpScreen;
begin
clrscr;
Writeln('BFPAGE++ Command Line Help:');
Writeln(' ');
Writeln('Usage = BFPAGE.EXE [Switch] [Switch] [Switch] [Switch] (Bulletin Name)');
Writeln(' ');
Writeln('SWITCHES:');
Writeln(' /P+ <--- Turns The Sysop Page Feature "ON"');
Writeln(' /P- <--- Turns The Sysop Page Feature "OFF"');
Writeln(' /PR+ <--- Turns The Printer Feature "ON"');
Writeln(' /PR- <--- Turns The Printer Feature "OFF"');
Writeln(' /PP+ <--- Turns The PRIVATE BBS Feature "ON"');
Writeln(' /PP- <--- Turns The PRIVATE BBS Feature "OFF"');
Writeln(' /SP+ <--- Turns The Second Password Feature "ON"');
Writeln(' /SP- <--- Turns The Second Password Feature "OFF"');
Writeln(' /H <--- Displays This Help Screen');
Writeln(' ');
Writeln('Bulletin Name Is OPTIONAL! If Not Used The Program Will Default');
Writeln('To ALL.BBS & ALL.CLR');
Writeln(' ');
Writeln('Example: BFPAGE.EXE /P+ /PP- /SP+ /PR+ Welcome4');
Writeln(' ');
Writeln('Any Valid SPITFIRE display screen can be used');
halt(1);
end;
Procedure ParamStatus;
begin
if ParamCount >5 then ParamError;
if ParamCount <= 0 then ParamError;
if (ParamStr(1) = '/H') or (ParamStr(1) = '/h') then HelpScreen;
end;
Begin; {Starts the program}
Clrscr;
RegistrationInfo;
Assign(UF,'SFNODE.DAT');
FileMode:=2; {Sets filemode to Read/Write}
{$I-}Reset(UF);{$I+}
if IOResult<>0 then {Checks for SFNODE.DAT}
begin
gotoxy(5,9);
writeln('Sorry... SFNODE.DAT not Found!');
Sound(900);
Delay(500);
NoSound;
Halt(1);
end;
FileMode:=2;
Read(UF,Page);
ParamStatus;
MakeMyLogo;
ChangeStatus;
Close(UF);
If IOResult<>0 Then TextColor(7); {Resets screen color to default}
end. {End the program}